﻿<Window x:Class="IS_Ever_Green.View.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Height="1024" Width="1440"
        WindowStyle="None"
        ResizeMode="NoResize"
        WindowStartupLocation="CenterScreen"
        MouseDown="Window_MouseDown"
        Background="Transparent"
        AllowsTransparency="True"
        >

    <Border CornerRadius="16">
        <Border CornerRadius="16"
                BorderThickness="5"
                Opacity="0.90"
                >

            <Border.BorderBrush>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                    <GradientStop Color="{StaticResource winBorderColor1}" Offset="0.0"/>
                    <GradientStop Color="{StaticResource winBorderColor2}" Offset="0.5"/>
                    <GradientStop Color="{StaticResource winBorderColor3}" Offset="1.0"/>
                </LinearGradientBrush>
            </Border.BorderBrush>

            <Border.Background>
                <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                    <GradientStop Color="{StaticResource primaryBackColorBeta}" Offset="0"/>
                    <GradientStop Color="{StaticResource secondaryBackColorBeta}" Offset="0.75"/>
                </LinearGradientBrush>
            </Border.Background>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="75"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="20"/>
                        <ColumnDefinition Width="40"/>
                        <ColumnDefinition Width="40"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>

                    <Button x:Name="btnClose"
                            BorderThickness="0"
                            Content="X"
                            Foreground="{StaticResource secondaryTextColor}"
                            FontSize="16"
                            FontFamily="Montserrat"
                            Cursor="Hand"
                            Grid.Column="1"
                            Click="btnClose_Click"
                            >  

                        <Button.Style>
                            <Style TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource primaryButtonColor}"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Background" Value="{StaticResource primaryButtonHoverColor}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>

                        <Button.Template>
                            <ControlTemplate TargetType="Button">
                                <Border Width="30" Height="30"
                                        CornerRadius="15"
                                        Background="{TemplateBinding Background}">

                                    <ContentPresenter VerticalAlignment="Center"
                                                      HorizontalAlignment="Center"/>

                                </Border>
                            </ControlTemplate>
                        </Button.Template>

                    </Button>

                    <Button x:Name="btnMinimize" 
                            BorderThickness="0"
                            Content="-"
                            Foreground="{StaticResource secondaryTextColor}"
                            FontSize="25"
                            FontFamily="Montserrat"
                            Cursor="Hand"
                            Grid.Column="2"
                            Click="btnMinimize_Click"
                            >

                        <Button.Style>
                            <Style TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource secondaryButtonColor}"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Background" Value="{StaticResource secondaryButtonHoverColor}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>

                        <Button.Template>
                            <ControlTemplate TargetType="Button">
                                <Border Width="30" Height="30" 
                                        CornerRadius="15"
                                        Background="{TemplateBinding Background}">

                                    <ContentPresenter VerticalAlignment="Center"
                                                      HorizontalAlignment="Center"/>

                                </Border>
                            </ControlTemplate>
                        </Button.Template>

                    </Button>

                </Grid>

                <StackPanel Width="700"
                            Grid.Row="2"
                            Orientation="Vertical"
                            Margin="0 65 0 0"
                            >

                    <Image Source="/Images/Logo.png" Width="300" Height="300"/>

                    <TextBlock Text="Добро подаловать в ИС"
                               Foreground="{StaticResource secondaryTextColor}"
                               FontSize="30"
                               FontWeight="Medium"
                               FontFamily="Montserrat"
                               HorizontalAlignment="Center"
                               />

                    <TextBlock Text="Интернет-магазина компьютерных деталей"
                               Foreground="{StaticResource secondaryTextColor}"
                               FontSize="30"
                               FontWeight="Medium"
                               FontFamily="Montserrat"
                               HorizontalAlignment="Center"
                               />

                    <Button x:Name="btnLogin"
                            BorderThickness="0"
                            Content="Войти в систему"
                            Foreground="{StaticResource secondaryTextColor}"
                            FontSize="16"
                            FontFamily="Montserrat"
                            Cursor="Hand"
                            Grid.Column="1"
                            Margin="0 50 0 0"
                            Click="btnLogin_Click"
                            >

                        <Button.Style>
                            <Style TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource primaryButtonColor}"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Background" Value="{StaticResource primaryButtonHoverColor}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>

                        <Button.Template>
                            <ControlTemplate TargetType="Button">
                                <Border Width="170" Height="50"
                                        CornerRadius="16"
                                        Background="{TemplateBinding Background}">

                                    <ContentPresenter VerticalAlignment="Center"
                                                      HorizontalAlignment="Center"/>

                                </Border>
                            </ControlTemplate>
                        </Button.Template>

                    </Button>

                    <Button x:Name="btnRegister"
                            BorderThickness="0"
                            Content="Зарегистрироваться"
                            Foreground="{StaticResource secondaryTextColor}"
                            FontSize="16"
                            FontFamily="Montserrat"
                            Cursor="Hand"
                            Grid.Column="1"
                            Margin="0 50 0 0"
                            Click="btnRegister_Click"
                            >

                        <Button.Style>
                            <Style TargetType="Button">
                                <Setter Property="Background" Value="{StaticResource secondaryButtonColor}"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="Background" Value="{StaticResource secondaryButtonHoverColor}"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Button.Style>

                        <Button.Template>
                            <ControlTemplate TargetType="Button">
                                <Border Width="250" Height="50"
                                        CornerRadius="16"
                                        Background="{TemplateBinding Background}">

                                    <ContentPresenter VerticalAlignment="Center"
                                                      HorizontalAlignment="Center"/>

                                </Border>
                            </ControlTemplate>
                        </Button.Template>

                    </Button>

                </StackPanel>

            </Grid>
        </Border>

    </Border>
</Window>
